<template>
    <div class="hello">
    <h1>新增的22211</h1>
        <p v-if="this.info[0]?.length">
        
          <p v-for="item in this.info[0]" :key="item.id">
            <p>table_name: {{item.table_name}}</p>
            <p>id: {{ item.id }}</p>
          <!-- eslint-disable-next-line vue/no-parsing-error -->
          </p>
           <!-- eslint-disable-next-line vue/no-parsing-error -->
        </p>
        <!-- eslint-disable-next-line vue/valid-v-else -->
        <p v-else>
        数据为空
        </p>
    </div>
</template>

<script>
export default {
    name: 'HelloWorld',
    data() {
        return {
            info: '',
        };
    },
    mounted() {
        this.getInfo();
    },
    props: {
        msg: String,
    },
    methods: {
        async getInfo() {
            fetch(`http://${location.hostname}:4444/hello`)
                .then(r => r.json())
                .then(res => {
                    this.info = res;
                });
        },
    },
};
</script>

<style scoped>
h3 {
    margin: 40px 0 0;
}
ul {
    list-style-type: none;
    padding: 0;
}
li {
    display: inline-block;
    margin: 0 10px;
}
a {
    color: #42b983;
}
</style>
